<h1>购物车</h1>
<div class="cart">
      <div class="name">名称</div>     
      <div class="amount">数量</div>      
      <div class="price">价格</div>
      <div class="operation">操作</div>
      <div class="price"><%=button_to "清空购物车",:action=>"empty_cart"%></div>
</div>
<DIV class=HackBox></DIV>
<% index=0%>
<% for cart_item in @cart.items %>
<div class="cart">
      <div class="name"><%= h(cart_item.title) %></div>     
      <div class="amount"><%= cart_item.quantity %></div>      
      <div class="price"><%= cart_item.price%></div>
      <div class="operation"><%=button_to "删除",:action=>"delete_from_cart",:id=>index %></div>
</div>
<% index +=1%>
<% end %>
<DIV class=HackBox></DIV>
<div class="cart">
  <div class="name"><%=link_to "返回商铺继续购物",:controller=>"shops",:action=>:show_products,:id=>@cart.shop_id%></div> 
<div class="amount"></div>
      <div class="price">总额:<%= @cart.total_price%></div>
      <div class="operation"><%=link_to "结账",:controller=>"orders",:action=>"new_order"%></div>
</div>
